import { MessageBus } from '../core/MessageBus';
import { CoreModule } from './BaseModule';

export type BaseControllerType = new (...args: any[]) => BaseController;

export abstract class BaseController<T extends CoreModule = CoreModule> {
    public static Init(model: BaseController, module: CoreModule) {
        model._module = module;
    }

    private _module: T = null;
    public get module() {
        return this._module;
    }

    public readonly event = new MessageBus();
}